﻿<Window x:Class="DiagramDesigner.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:DiagramDesigner"
        WindowStartupLocation="CenterScreen"
        Title="Diagram Designer Part 2"
        FontFamily="SegoeUI"
        Height="850"
        Width="1100">
    <DockPanel Margin="0">
        <ToolBar Height="35"
                 DockPanel.Dock="Top">
            <Button ToolTip="New"
                    Margin="8,0,3,0"
                    Click="OnClickNew">
                <Button.Content>
                    <Image Stretch="Uniform"
                           Source="Images/newBold.png" />
                </Button.Content>
            </Button>
            <Button ToolTip="Rotate Right 90°"
                    Margin="8,0,3,0"
                    Click="OnClickRotateRight">
                <Button.Content>
                    <Image Stretch="Uniform"
                           Source="Images/rotateRight.png" />
                </Button.Content>
            </Button>
            <Button ToolTip="Rotate Left 90°"
                    Margin="8,0,3,0"
                    Click="OnClickRotateLeft">
                <Button.Content>
                    <Image Stretch="Uniform"
                           Source="Images/rotateLeft.png" />
                </Button.Content>
            </Button>
        </ToolBar>
        
        <Grid Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="230" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Border Margin="3,1,0,0"
                    Grid.Column="1"
                    BorderBrush="LightGray"
                    BorderThickness="1">
                <Grid>
                    <ScrollViewer Name="DesignerScrollViewer"
                                  Background="Transparent"
                                  HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                        <s:DesignerCanvas x:Name="MyDesignerCanvas"
                                          MinHeight="800"
                                          MinWidth="1000"
                                          AllowDrop="True"
                                          Background="White">
                        </s:DesignerCanvas>
                    </ScrollViewer>
                    <s:ZoomBox Width="180"
                               HorizontalAlignment="Right"
                               VerticalAlignment="Top"
                               ScrollViewer="{Binding ElementName=DesignerScrollViewer}"
                               Margin="0,5,25,0" />
                </Grid>
            </Border>
            <Border Grid.Column="0"
                    BorderBrush="LightGray"
                    BorderThickness="1">
                <StackPanel>
                    <Expander IsExpanded="True"
                              Header="Symbols"
                              Margin="0,1,0,0"
                              Content="{StaticResource SymbolStencils}" />
                    <Expander IsExpanded="False"
                              Header="Flow Chart"
                              Margin="0,1,0,0"
                              Content="{StaticResource FlowChartSymbols}" />
                    <Expander IsExpanded="False"
                              Header="Regelungstechnik"
                              Margin="0,1,0,0"
                              Content="{StaticResource RegelungstechnikSymbole}" />
                    <!--<Expander Header="Basic Shapes"
                              Margin="0,1,0,0"
                              Content="{StaticResource BasicShapesStencils}" />-->

                </StackPanel>
            </Border>

            <GridSplitter Grid.Column="1"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Stretch"
                          Background="Transparent"
                          Width="3" />
        </Grid>
    </DockPanel>
</Window>
